package com.wdnmd.controller;

import com.wdnmd.domain.Item;
import com.wdnmd.service.ItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
public class ItemController {
    @Autowired
    private ItemService itemService;

    @RequestMapping("/find")
    public String show(Model model){
        List<Item> all = itemService.findAll();
        model.addAttribute("itemList" , all);
        return "ceshi";
    }
}
